﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Fotografii.aspx.cs" Inherits="Fotografii" Title="Untitled Page" Theme="Theme" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
    <table class="style2" style="vertical-align: top; font-family: Arial; font-size: small;">
            <tr>
                <td align="center" style="font-size: large" >
                    ФОТОГРАФИИ</td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                DataKeyNames="ID" DataSourceID="SqlDataSource1" AllowPaging="True" 
                                CellPadding="4" ForeColor="#333333" GridLines="Horizontal" 
                                onselectedindexchanged="GridView1_SelectedIndexChanged1" Width="100%" 
                                AllowSorting="True">
                                <RowStyle BackColor="#CEC8B5" ForeColor="#333333" />
                                <Columns>
                                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="false"
                                        ReadOnly="True" SortExpression="ID" />
                                    <asp:TemplateField HeaderText="Слика">
                                    <ItemTemplate>
                                    <asp:ImageButton ID="Image1" runat="server" CommandName="Select"
                                            ImageUrl='<%# Eval("image")%>' Height="100px" BorderColor="Black" 
                                            BorderStyle="Solid" BorderWidth="2px" />
                                    </ItemTemplate>
                                        <HeaderStyle Font-Overline="False" />
                                        <ItemStyle Height="100px" HorizontalAlign="Center" />
                                    </asp:TemplateField>

                                    <asp:ButtonField CommandName="Select" DataTextField="name" HeaderText="Име" 
                                        Text="Button">
                                        <ControlStyle Font-Underline="False" />
                                        <ItemStyle Font-Underline="False" />
                                    </asp:ButtonField>
                                    <asp:BoundField DataField="points" HeaderText="Бодови" 
                                        SortExpression="points" />
                                    <asp:BoundField DataField="votes" HeaderText="Гласови" 
                                        SortExpression="votes" />

                                </Columns>
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="Gray" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#999999" />
                                <AlternatingRowStyle BackColor="#D9D9D9" ForeColor="#006666" 
                                    BorderStyle="Solid" />
                            </asp:GridView></td>
            </tr>
        </table>
&nbsp;<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:PhotographersConnectionString %>" 
                                
                                SelectCommand="SELECT [ID], [name], [image], [votes], [points] FROM [Photos]">
                            </asp:SqlDataSource>  
</asp:Content>

